class Student(object):
    count = 0
    def __init__(self, name, gender):
        self.__name = name
        self.__gender = gender
        Student.count += 1
    def get_gender(self):
        return self.__gender
    def set_gender(self, gender):
        self.__gender = gender
    def get_num(self):
        return Student.count

wang = Student('wang',1)
print(wang.count)
sun = Student('sun',2)
print(sun.count)
sun.count = 5
print(sun.count)